<?php
include_once('common/header.php');
$strReferer		= isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
$intError		= $objRequest->getParam('err', 0);
if($intError > 0) {
	$arrExplode	= explode('?', $strReferer);
	if(count($arrExplode) > 1) {
		$strReferer = $arrExplode[0];
	}	
}
//
if($AppUI->id > 0 && ($strReferer == LINK_USER_PREFERENCE || ($strReferer == LINK_USER_EDUCATION_WORKING && $intError > 0))) {
	$objCommon 		= new Vfriend_Common();
	$arrCountry		= $objCommon->getCountry();
	$arrProvince	= $objCommon->getProvince(COUNTRY_DEFAULT);
	$this->view->arrCountry 	= $arrCountry;
	$this->view->arrProvince 	= $arrProvince;
	if(isset($_SESSION['ework']))
		$this->view->arrParam	= $_SESSION['ework'];
}
else {	
	Vfriend_Function::redirect(HOST_VFRIEND);
	exit();
}
?>